package com.sac.approval.dao;

import com.sac.approval.domain.ApprovalDO;
import com.sac.approval.domain.ApprovalLineDO;
import com.sac.approval.domain.ApprovalTemplateDO;
import com.sac.approval.vo.ApprovalVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;


@Mapper
public interface ApprovalQueryDao {

	ApprovalDO getApproval(String appId);

	ApprovalTemplateDO getApprovalTemplate(String appTemplateId);

	ApprovalLineDO getApprovalLine(String appLineId);

	ApprovalLineDO getApprovalDraft(String appId);

	List<ApprovalLineDO> getPendingApproverList(String appId);

	List<ApprovalLineDO> getPendingSimpleApproverList(String appId);

    ApprovalLineDO getFirstApprovalLine(String appId);

	List<ApprovalLineDO> listLines(Map<String, Object> map);

	List<ApprovalVO> listPending(Map<String, Object> map);

	int getPendingNotReadCount(Map<String, Object> map);

	List<ApprovalDO> listSubmission(Map<String, Object> map);

	List<ApprovalTemplateDO> listPostponed(Map<String, Object> map);

	List<ApprovalVO> listPreliminary(Map<String, Object> map);

	List<ApprovalVO> listApproved(Map<String, Object> map);

	List<ApprovalVO> listNotification(Map<String, Object> map);

}
